Hello,
I want to loop over my variable list, but also be able to have a number `i' that reflects the loop iteration.
Is there a way to have both of these in the loop? Or another way to accomplish?
All I know how to do is manually create a list of locals like this with the whole varlist:
Then loop with i = 1/n and variable`i'
But is there a way to do this without making that local list manually?
Thanks for any help!
Reese
I want to loop over my variable list, but also be able to have a number `i' that reflects the loop iteration.
Code:
foreach var in varlist *{ [command using loop iteration `i' and `var'] }
All I know how to do is manually create a list of locals like this with the whole varlist:
Code:
local variable1 make local variable2 price local variable3 mpg [...]
But is there a way to do this without making that local list manually?
Thanks for any help!
Reese
Comment